package com.jh.paymentchannel.repository;

import com.jh.paymentchannel.pojo.JFQuickRegister;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;


@Repository
public interface JFQuickRegisterRepository extends JpaRepository<JFQuickRegister, String>, JpaSpecificationExecutor<JFQuickRegister>{
	
	@Query("select jfq from  JFQuickRegister jfq where jfq.phone=:phone and jfq.bankCard=:bankCard")
	public JFQuickRegister getJFQuickRegisterByPhoneAndBankCard(@Param("phone") String phone, @Param("bankCard") String bankCard);
	
	@Query("select jfq from  JFQuickRegister jfq where jfq.phone=:phone and jfq.rateCode1=:rateCode1")
	public JFQuickRegister getJFQuickRegisterByPhoneAndRateCode1(@Param("phone") String phone, @Param("rateCode1") String rateCode1);
	
	@Query("select jfq from  JFQuickRegister jfq where jfq.phone=:phone and jfq.rateCode2=:rateCode2")
	public JFQuickRegister getJFQuickRegisterByPhoneAndRateCode2(@Param("phone") String phone, @Param("rateCode2") String rateCode2);
	
	@Query("select jfq from  JFQuickRegister jfq where jfq.bankCard=:bankCard")
	public JFQuickRegister getJFQuickRegisterByBankCard(@Param("bankCard") String bankCard);
	
	@Query("select jfq from  JFQuickRegister jfq where jfq.idCard=:idCard")
	public JFQuickRegister getJFQuickRegisterByIdCard(@Param("idCard") String idCard);
	
	
	
}
